#-------------------------------------------------
#
# Project created by QtCreator 2019-08-16T11:41:13
#
#-------------------------------------------------
include($$PWD/../FreyaLib/FreyaLib.pri)
include($$PWD/../FreyaCommon/Freyacommon.pri)

QT       += core
QT       -= gui

CONFIG(debug, debug|release) {
    FREYAMODULE_NAME = FreyaVerification_d
} else {
    FREYAMODULE_NAME = FreyaVerification
}

TARGET = $${FREYAMODULE_NAME}
TEMPLATE = lib

win32 {
DESTDIR = $${FREYALIB_LIBPATH}
DLLDESTDIR = $$PWD/../bin/module
}
unix {
DESTDIR = $$PWD/../bin/module
}

DEFINES += FREYAVERIFICATION_LIBRARY

unix {
SVNVER = $$system(svn info | grep 'Changed\ Rev' | cut -b 19-)
isEmpty(SVNVER){
SVNVER = $$system(svn info | grep '最后修改的版本' | cut -b 24-)
}
}
win32{
VERSTR = $$system('svn info | findstr "Last\ Changed\ Rev:"')
VERSTR = $$replace(VERSTR, Last , )
VERSTR = $$replace(VERSTR, Changed , )
SVNVER = $$replace(VERSTR, Rev: , )
}
isEmpty(SVNVER){
SVNVER = 0
message("faild to read svn version, use default version:$${SVNVER}")
}
VERSION = 1.0.2.$$SVNVER
DEFINES += FREYAMODULE_VER=\\\"$$VERSION\\\"

message("$${FREYAMODULE_NAME} version:$${VERSION}")

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += QT_MESSAGELOGCONTEXT

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

QMAKE_TARGET_COMPANY = SchindlerenDesign
QMAKE_TARGET_PRODUCT = $${FREYAMODULE_NAME}
QMAKE_TARGET_DESCRIPTION = Freya Framework Module Example
QMAKE_TARGET_COPYRIGHT = Copyright (C) SchindlerenDesign

SOURCES += \
        freyaverification.cpp \
        testinterface.cpp

HEADERS += \
        freyaverification.h \
        freyaverification_global.h  \
        testinterface.h

INCLUDEPATH += $${FREYALIB_INCLUDEPATH} \
               $${FRC_INCLUDEPATH}

FORMS += \
    testinterface.ui

LIBS += -L$${FREYALIB_LIBPATH}
unix {
    LIBS += -l$${FREYALIB_NAME} \
            -l$${FRYCOMMON_NAME} }
win32 {
    LIBS += -l$${FREYALIB_NAME}7 \
            -l$${FRYCOMMON_NAME}2 }

win32 {
    src_dir = $$PWD/../config/
    dst_dir = $$DESTDIR/config/
    src_dir ~= s,/,\\,g
    dst_dir ~= s,/,\\,g
    system(xcopy $$src_dir $$dst_dir /y )
}
